package jm.nj.day10.demo03;

import java.io.*;

/*
* 使用特殊功能
* 把Demo01.java --->cp4.txt
*
*
* */
public class Test04 {
    public static void main(String[] args) throws IOException {
        //创建对象
        BufferedReader br = new BufferedReader(new FileReader("Demo01.java"));
        BufferedWriter bw = new BufferedWriter(new FileWriter("cp4.txt"));

        String line;
        while ((line = br.readLine()) != null){
            bw.write(line);
            bw.newLine();
            bw.flush();
        }
        bw.close();
        br.close();
    }
}
